package com.bwda.dsrs.filecenter.quartz;

/**
 * @author liuxiaoyong
 * @date 2019/11/22
 */
public class TaskServiceException extends Exception {
    private static final int DEFAULT_ERROR_CODE = 201;

    /**
     * 错误码,用于返回接口code
     */
    private int errCode;

    public TaskServiceException() {
        super();
    }


    public TaskServiceException(String msg) {
        super(msg);
        this.errCode = DEFAULT_ERROR_CODE;
    }

    public TaskServiceException(int errCode, String msg) {
        super(msg);
        this.errCode = errCode;
    }

    public TaskServiceException(String msg, Throwable e) {
        super(msg, e);
        this.errCode = DEFAULT_ERROR_CODE;
    }

    public TaskServiceException(int errCode, String msg, Throwable e) {
        super(msg, e);
        this.errCode = errCode;
    }


    public int getErrCode() {
        return errCode;
    }
}

